﻿using System.IO;

namespace Sentrana_QA.BlueRidgeTest.Common.Logger
{
    public class ExcelReader
    {        
        public System.Data.DataTable ReadInputFromFile(string in_excel_file, string worksheet)
        {
            ExcelDataReader.ExcelDataReader reader = null;
            FileStream fs = new FileStream(in_excel_file, FileMode.Open, FileAccess.Read, FileShare.Read);
            reader = new ExcelDataReader.ExcelDataReader(fs);
            fs.Close();

            return reader.WorkbookData.Tables[worksheet];
        }
    }
}
